test(ci): guard the Codex auto-resolve missing-token graceful skip#635
Conversation
The graceful skip that keeps the request job green when CODEX_TRIGGER_TOKEN is unset (job-env binding + step-level if-guards + warning) had no regression coverage, so it could be silently removed and turn every Codex review into a red check on a merged-but-unconfigured workflow. - Assert the missing-token handling (env binding, both if-guards, warning message) in scripts/check-codex-autofix-workflow.mjs. - Add guard mutation tests that fail if the warning branch or the request step's skip guard is removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NrdqyvKzaovZUX9haKfgjM
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Codex auto-resolve workflow guard now checks graceful handling of an unset ChangesCodex token handling guard
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Static PR checks failed on format:check for the PR #635 ledger row. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* docs: record post-merge review of PR #635 PR #635 was already squash-merged with green CI and no open review threads; record the merge-readiness outcome in the branch review ledger. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * style: format branch-review-ledger for Prettier CI Static PR checks failed on format:check for the PR #635 ledger row. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
Follow-up to #610. The graceful skip added there — the request job stays green (warning annotation, not a red check) when
CODEX_TRIGGER_TOKENis unset — had no regression coverage. It could be removed silently, which would turn every Codex review into a failing check on the merged-but-unconfigured workflow. This adds that coverage.scripts/check-codex-autofix-workflow.mjs): assert the missing-token handling is present — the job-levelCODEX_TRIGGER_TOKENenv binding, both step-levelif:guards (== ''warn /!= ''run), and the warning message.tests/codex-autofix-workflow.test.ts): two guard-mutation tests that fail if the warning branch or the request step's skip guard is removed.No workflow behavior change — this is test/guard hardening only.
Verification
node scripts/check-codex-autofix-workflow.mjspassesnpx vitest run tests/codex-autofix-workflow.test.ts— 30/30 (2 new)npm run verify:pr-local— N/A: change limited to a CI guard script and its unit tests; no app source, build, or runtime surface touchednpm run verify:ui— N/A: no UI/routing/styling/browser changenpm run verify:release— N/A: no release/handoff claimClinical Governance Preflight
N/A — does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output. CI guard + tests only.
Notes
5220d6a(same intent); that one can be closed.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit